<template>
    <div class="root">
        <h1 style="font-size: 25px;">热点事件</h1>
       <selectOne @ChoseCity="cityHandle"></selectOne>
<scroll :receivecity="receivecity"></scroll>
    </div>
    </template>
    <script>
  import scroll from './scroll.vue';
import selectOne from './selectOne.vue';
    export default{
        data(){
            return{
                receivecity:''
            }
        },
        components:{
         scroll,selectOne
        },
        methods:{
            //接收到选择器传递的数据
            cityHandle(chosecity){
                this.receivecity=chosecity
                console.log('父组件获取到的',this.receivecity)
            }
        }
    }
    </script>
    <style scoped>
    *{
        color: white;
    }
.root{
    /* border: white 1px solid;
     */
     border-top: white 2px solid;
    margin-left: 1px;
    margin-top:330px;
}
</style>